Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Alignment API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
moex
Alignment API
Commits
3f1eef1d
Commit
3f1eef1d
authored
14 years ago
by
Jérôme Euzenat
Browse files
Options
Downloads
Patches
Plain Diff
- improved (legacy) parsing of uriX and ontoX (with default recopy)
parent
92a0b565
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fr/inrialpes/exmo/align/parser/XMLParser.java
+18
-23
18 additions, 23 deletions
src/fr/inrialpes/exmo/align/parser/XMLParser.java
with
18 additions
and
23 deletions
src/fr/inrialpes/exmo/align/parser/XMLParser.java
+
18
−
23
View file @
3f1eef1d
...
@@ -325,8 +325,6 @@ public class XMLParser extends DefaultHandler {
...
@@ -325,8 +325,6 @@ public class XMLParser extends DefaultHandler {
String
about
=
atts
.
getValue
(
SyntaxElement
.
RDF_ABOUT
.
print
()
);
String
about
=
atts
.
getValue
(
SyntaxElement
.
RDF_ABOUT
.
print
()
);
if
(
about
!=
null
&&
!
about
.
equals
(
""
)
)
{
if
(
about
!=
null
&&
!
about
.
equals
(
""
)
)
{
try
{
try
{
// JE: Onto
//curronto.setOntology( new URI( atts.getValue("rdf:about") ) );
curronto
.
setURI
(
new
URI
(
about
)
);
curronto
.
setURI
(
new
URI
(
about
)
);
}
catch
(
URISyntaxException
e
)
{
}
catch
(
URISyntaxException
e
)
{
throw
new
SAXException
(
"onto2: malformed URI"
);
throw
new
SAXException
(
"onto2: malformed URI"
);
...
@@ -451,41 +449,38 @@ public class XMLParser extends DefaultHandler {
...
@@ -451,41 +449,38 @@ public class XMLParser extends DefaultHandler {
if
(
extensions
!=
null
)
((
BasicCell
)
cell
).
setExtensions
(
extensions
);
if
(
extensions
!=
null
)
((
BasicCell
)
cell
).
setExtensions
(
extensions
);
}
else
if
(
pName
.
equals
(
SyntaxElement
.
MAP
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
MAP
.
name
))
{
}
else
if
(
pName
.
equals
(
"uri1"
))
{
// Legacy
}
else
if
(
pName
.
equals
(
"uri1"
))
{
// Legacy
if
(
onto1
.
getURI
()
==
null
){
//JE: Onto
try
{
try
{
URI
u
=
new
URI
(
content
);
URI
u
=
new
URI
(
content
);
onto1
.
setURI
(
u
);
// JE: Onto
if
(
onto1
.
getFile
()
==
null
)
onto1
.
setFile
(
u
);
//onto1.setOntology( u );
}
catch
(
URISyntaxException
e
)
{
onto1
.
setURI
(
u
);
throw
new
SAXException
(
"uri1: malformed URI : "
+
content
);
}
catch
(
URISyntaxException
e
)
{
throw
new
SAXException
(
"uri1: malformed URI"
);
}
}
}
}
else
if
(
pName
.
equals
(
"uri2"
))
{
// Legacy
}
else
if
(
pName
.
equals
(
"uri2"
))
{
// Legacy
if
(
onto2
.
getURI
()
==
null
){
//JE: Onto
try
{
try
{
URI
u
=
new
URI
(
content
);
URI
u
=
new
URI
(
content
);
onto2
.
setURI
(
u
);
// JE: Onto
if
(
onto2
.
getFile
()
==
null
)
onto2
.
setFile
(
u
);
//onto2.setOntology( u );
}
catch
(
URISyntaxException
e
)
{
onto2
.
setURI
(
u
);
throw
new
SAXException
(
"uri1: malformed URI : "
+
content
);
}
catch
(
URISyntaxException
e
)
{
throw
new
SAXException
(
"uri2: malformed URI"
);
}
}
}
}
else
if
(
pName
.
equals
(
SyntaxElement
.
ONTOLOGY
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
ONTOLOGY
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
LOCATION
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
LOCATION
.
name
))
{
try
{
curronto
.
setFile
(
new
URI
(
content
)
);
try
{
curronto
.
setFile
(
new
URI
(
content
)
);
}
catch
(
URISyntaxException
e
)
{
}
catch
(
URISyntaxException
e
)
{
throw
new
SAXException
(
"
onto2: m
alformed URI
"
);
throw
new
SAXException
(
"
M
alformed URI
: "
+
content
);
}
}
}
else
if
(
pName
.
equals
(
SyntaxElement
.
FORMALISM
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
FORMALISM
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
FORMATT
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
FORMATT
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
MAPPING_SOURCE
.
name
)
||
pName
.
equals
(
SyntaxElement
.
MAPPING_TARGET
.
name
))
{
}
else
if
(
pName
.
equals
(
SyntaxElement
.
MAPPING_SOURCE
.
name
)
||
pName
.
equals
(
SyntaxElement
.
MAPPING_TARGET
.
name
))
{
if
(
curronto
.
getFile
()
==
null
&&
if
(
curronto
.
getFile
()
==
null
&&
content
!=
null
&&
!
content
.
equals
(
""
)
)
{
content
!=
null
&&
!
content
.
equals
(
""
)
)
{
try
{
curronto
.
setFile
(
new
URI
(
content
)
);
try
{
URI
u
=
new
URI
(
content
);
curronto
.
setFile
(
u
);
if
(
curronto
.
getURI
()
==
null
)
curronto
.
setURI
(
u
);
}
catch
(
URISyntaxException
e
)
{
}
catch
(
URISyntaxException
e
)
{
throw
new
SAXException
(
pName
+
": malformed URI
"
);
throw
new
SAXException
(
pName
+
": malformed URI
: "
+
content
);
}
}
};
};
curronto
=
null
;
curronto
=
null
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment