Download - Diplomna Rabota IT
-
7/28/2019 Diplomna Rabota IT
1/73
" . "
:
: , . -21362
:
:
: .
: .
2007 .
-
7/28/2019 Diplomna Rabota IT
2/73
2
1. ............................................................................................. 4
1.1. ....................................................... 4
1.2. .................................................. 5
1.3. ......................................... 5
1.4. .............................................. 6
2.
......................................................................... 9
2.1. ................ 9
2.2. ................... 9
2.2.1. .......................................................... 10
2.2.2. ....................... 12
2.2.3. - .......... 14
2.3. ........................................ 14
3. ............................................ 16
3.1. RDF ...................................................................................... 16
3.1.1. RDF .................................. 16
3.1.2. RDF .................................................. 18
3.1.3. XML- RDF .......................................... 21
3.1.3.1. QNames .................................................................... 21
3.1.3.2. RDF/XML ................................................................... 23
3.2. RDFa ..................................................................................... 25
3.3. OWL ..................................................................................... 27
3.3.1. OWL ......................................................... 27
3.3.2. OWL .............................................. 31
3.3.2.1. .................................................................... 31
3.3.2.2. ................................................................ 32
3.3.2.3. ................................................................... 32
3.4. JEE 5.0 .................................................................................. 34
-
7/28/2019 Diplomna Rabota IT
3/73
3
3.4.1. JSF ................................................................................. 37
3.4.2. ...................................................................... 38
3.4.3. Java Persistence API ......................................................... 39
4. ............................................................ 41
4.1. ............................................... 41
4.2. ..................................................... 43
4.2.1. Model-2 MVC ................................................. 43
4.2.2. ......................................... 44
4.2.2.1. ................................................................. 45
4.2.2.2. ...................................................................... 46
4.2.2.3. ....................................................................... 47
4.3. ............................................................ 484.3.1. JSF UI ............................................................................. 50
4.3.2. JSF Managed Beans .......................................................... 54
4.3.2.1. DocumentMB ............................................................. 54
4.3.2.2. FileMB ....................................................................... 55
4.3.2.3. EditMB ...................................................................... 56
4.3.2.4. OntologyMB ............................................................... 57
4.3.2.5. TableMB .................................................................... 59
4.3.2.6. HyperlinkMB .............................................................. 59
4.3.2.7. FormatMB .................................................................. 60
4.3.3. Session EJBs .................................................................... 60
4.3.3.1. Ontology_EJB_WS ...................................................... 60
4.3.3.2. Ontology_EJB_Persistence ........................................... 61
4.4. ......................................................... 61
4.5. ...................................................... 62
5. ....... 65
.................................. 67
...................................................................... 72
-
7/28/2019 Diplomna Rabota IT
4/73
4
1.World Wide Web (WWW)
.
.
,
- Web
. -
, .
,
.
WWW (Web 2.0)
(Web 3.0). WWW,
.
WWW
, . -
,
( ,
), .
,
(
,
, ; ,
;
..).
1.1.
-
7/28/2019 Diplomna Rabota IT
5/73
5
.
,
.
.
,
.
1.2. 1. ;
.
2. ,
( Java EE5.0
).
3. , , , .
4. .1.3.
WWW :
- ;
, -.
,
.
-
7/28/2019 Diplomna Rabota IT
6/73
6
,
.
Adobe, IBM ,
, .
.
,
WWW .
. ,
.
, , ,
, .
-, ,
SPARQL
,
. ,
, - XHTML
RDFa ,
, XHTML.
, ,
, -
.
1.4. 2
, WWW,
. 2.1
. 2.2
. 2.2.1 .
,
-
7/28/2019 Diplomna Rabota IT
7/73
7
, . 2.2.2
.
, ,
, . 2.2.3
-. 2.3
-
- , ,
, RDF .
3 ,
.
3.1 RDF.
3.1.1 , RDF.
3.1.2 ,
RDF .
3.1.3 RDF , XML.
RDF
.
RDF/XML .
3.2 RDFa,
XHTML. RDFa , RDF
XHTML.
3.3.1 OWL ,
-
. - RDF-S. 3.3.2
(,
), .
3.4 Java EE 5.0
. 3.4.1
JSF ,
UI .
3.4.2 ,
-
7/28/2019 Diplomna Rabota IT
8/73
8
Java EE 5.0 .
.
3.4.3
Java EE 5.0 , Java Persistence API,
-
java persistent -
.
4 .
4.1.
, 4.2
, Java EE 5.0
. 4.2.1 Model-2 MVC, Java EE 5.0. 4.2.2
,
.
Java EE 5.0 .
4.3 . -
java .
4.3.1 JSF .
4.3.2 managed beans, .
4.3.3 session EJBs,
Java Persistence API. 4.4
, .
4.5 .
5
.
-
7/28/2019 Diplomna Rabota IT
9/73
9
2.
2.1.
WWW
( , , ..),
. ,
.
, ,
.
.
,
,
. .
.
.
, .
,
.
,
.
, .
WWW -,
. -
. -
, .
, .
2.2.
-
7/28/2019 Diplomna Rabota IT
10/73
10
2.2.1.
WWW, Internet Engineering Task Force World Wide
Web Consortium (W3C) ,
.
.
1997 . W3C Resource
Description Framework (RDF). RDF ,
,
Universal Resource
Identifiers (URIs). - ,
WWW XML .
, , URI .
1999 . RDF W3C recommendation, ..
.
,
WWW. RDF WWW.
2004 . W3C recommendation - RDF
Schema (RDFS). RDF
, .
, ,
. RDFS
RDF
, .. RDFS
.
RDF RDFS -
, RDF
,
-
7/28/2019 Diplomna Rabota IT
11/73
11
. , ,
, SPARQL.
W3C recommendation.
Web Ontology Language (OWL) ,
- RDFS. O 2004 .
W3C recommendation.
OWL,
-
. OWL
, ,
. OWL
, . OWL
.
-
XHTML ,
, .
RDFa, W3C
recommendation, XHTML,
meta link, XHTML
. RDFa
RDF XHTML .
,
, 2005. Rule
Interchage Format Working Group W3C.
(RIF) ,
RDF OWL.
.
,
,
.
-
7/28/2019 Diplomna Rabota IT
12/73
12
2.2.2. 1 :
1.
URIs, Unicode
. URIs .
XML
.
(xmlschema) . .
, -,
.
XML
XML . XML namespaces,
-
7/28/2019 Diplomna Rabota IT
13/73
13
URIs.
XML .
, WWW.
. RDF
.
, XML
. RDF
. ,
,
.
, . RDF RDF Schema.
OWL.
, RDF,
-.
,
,
.
, .
Rule Interchange Format (RIF).
,
, ,
.
o
.
, ,
, .
, , .
.. ,
-
7/28/2019 Diplomna Rabota IT
14/73
14
, ..
.
. ,
,
.
2.2.3. -
- :
,
;
XHTML (Extensible HTML) , HTML , XML;
XML , . ,
- ,
.
.
2.3. -
, .
,
- .
,
-
7/28/2019 Diplomna Rabota IT
15/73
15
: XMP (Adobe), SemanticWorks 2006 (Altova), Amilcare (University
of Sheffield), Cerebra Server, Cypher, DERI Ontology Management
Environment, Graphl, GrOWL, IODT (IBM), Web Ontology Manager (IBM),
Semantic Layered Research Platform (IBM), RDF InferEd (Intellidimension),
IsaViz, LinKFactory (Language & Computing), M3t4.Studio Semantic Toolkit
(Metatomix), Model Futures OWL Editor, Data Spaces Platform (Open Link),
OWL verbalizer, pOWL, Semantic Information Router (Profium), RDFe,
Semantic Web Client, Seamark Navigator (Siderean), Enterprise Information
Integrator (Software AG), Protege (University of Stanford), SWOOP
(University of Maryland), Experiment Design Automation (Teranode), Thetus
Publisher, TopBraid Composer (Top Quandrant), VisualKii, Enterprise
Information Integration (@Semantics).- RDF : Aduna
Metadata Server, Boca, D2RQ & D2R Server, AllegroGraph (Franz Inc), RDF
Gateway (Intellidimension), Joseki (Jena), Kowari Metastore, Mulgara
Semantic Store, Virtuoso (OpenLink), Oracle Spatial 10g, OWLIM, RDFStore,
RDF server (RAP), SemWeb for .NET, Sesame, Tucana Suite (Northrop
Grumman), YARS/Yet Another RDF Store, 3Store.
-
7/28/2019 Diplomna Rabota IT
16/73
16
3. 3.1. RDF
RDF WWW. -
-
. , RDF, :
; ; XML- ; XML Schema ; .
3.1.1. RDF
, WWW
, , ,
.
RDF ,
HTML , .
WWW
, , . RDF
,
, . -
.
Uniform Resource Identifiers (URIs),
RDF URI references,
-
7/28/2019 Diplomna Rabota IT
17/73
17
, RDF URI. ,
, URI
RDF, ,
WWW
. WWW,
,
, -. , WWW
, , URIs
. ,
. URI , ( http:)
(DNS),
. , URI. , URI
, . ,
URI, ,
URIs .
RDF URIs, ,
. URIs ,
, .
WWW
.
WWW.
. ,
,
URIs, . -
- (
) WWW.
,
.
,
,
-
7/28/2019 Diplomna Rabota IT
18/73
18
.
, , URIs -
WWW ,
URIs.
,
.
URIs
, , .
URIs URL ,
,
. , RDF URI
, o .
3.1.2. RDFRDF .
RDF ,
.
, . ,
.
, , .
.
.
, .
RDF URIs,
RDF URIs .
http://www.example.org/index.html has a creator whose value is
John Smith.
RDF :
-
7/28/2019 Diplomna Rabota IT
19/73
19
http://www.example.org/index.html; http://purl.org/dc/elements/1.1/creator; http://www.example.org/staffid/85740 .
URI ,
.
URIs. URI
Dublin Core, RDF
(
, , , ..). URI
(creator) .
John Smith, example
85740. URI http://www.example.org/staffid/85740. URIs
, RDF
.
2:
2. RDF
RDF
. -
. ,
URI.
http://www.example.org/index.html has a creator whose value is
John Smith. He is 27 years old.
-
7/28/2019 Diplomna Rabota IT
20/73
20
RDF :
http://www.example.org/index.htmlhas a creatorwhose valueis worker 85740.
o http://www.example.org/index.html;o http://purl.org/dc/elements/1.1/creator;o http://www.example.org/staffid/85740 .
Worker 85740 has a name whose value isJohn Smith.o http://www.example.org/staffid/85740 ;o http://www.example.org/terms/name ;o John Smith.
Worker 85740 has an age whose value is 27.o
http://www.example.org/staffid/85740 ;o http://www.example.org/terms/age ;o 27.
RDF 3:
3. RDF
John Smith 27 .
name age URIs,
http://www.example.org/terms .
RDF URIs,
. . ,
, ,
-
7/28/2019 Diplomna Rabota IT
21/73
21
, ,
. ,
. ,
URIs
http://www.example.org/terms/name
http://www.domain2.example.org/programming/terms/name
, .
, URI references
, ,
.
, ,
-. , URI references
RDF .
3.1.3. XML- RDF3.1.3.1. QNames
XML
XML .
RDF/XML XML QNames, RDF URI references.
QNames namespace , URI reference
. QNames ,
namespace URI, : . -
QName , RDF, :
Namespace
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#rdfs: http://www.w3.org/2000/01/rdf-schema#
dc: http://purl.org/dc/elements/1.1/
owl: http://www.w3.org/2002/07/owl#
xsd: http://www.w3.org/2001/XMLSchema#
-
7/28/2019 Diplomna Rabota IT
22/73
22
, RDF URI references
. RDF URI references, ,
XML . RDF
, -,
XML XML .
URI references,
, . URI reference
. URI references
, .
, : ,
. example.org
. creation-date product, .
URI references,
http://www.example.org/terms/. ,
, URI references,
http://www.example.org/staffid/.
RDF ,
. URI references RDF
http://www.w3.org/1999/02/22-rdf-syntax-ns#,
URI reference QName rdf:. RDF
Vocabulary Description Language (RDFS)
, URI references,
http://www.w3.org/2000/01/rdf-schema#
QName rdfs:.
URI
URI references .
. RDF URI references,
. RDF ,
URI references,
. URI references
-
7/28/2019 Diplomna Rabota IT
23/73
23
.
, URI references, .
URI reference
URL , .
QName dc: URI reference
http://purl.org/dc/elements/1.1/.
Dublin Core. URI reference Web ,
(-
RDF schema). . RDF ,
URI, , ,
.
3.1.3.2. RDF/XML
http://www.example.org/index.htmlhas a creation-date whose value
isAugust 16, 1999
RDF
ex:index.html exterms:creation-date "August 16, 1999"
RDF/XML :
1.
2.
3.
4. August 16, 1999
5.
6.
1 XML , , -
XML, XML
.
-
7/28/2019 Diplomna Rabota IT
24/73
24
2 rdf:RDF . , XML
, 6,
RDF . rdf:RDF XML namespace
, xmlns rdf:RDF .
, ,
rdf: namespace, URI reference
http://www.w3.org/1999/02/22-rdf-syntax-ns#. URI references,
http://www.w3.org/1999/02/22-rdf-syntax-ns#,
RDF . XML namespace ,
exterms:. xmlns
rdf:RDF , URI reference
http://www.example.org/terms/ exterms:. URIreferences, http://www.example.org/terms /,
, examples. >
2 rdf:RDF . 1-2
, RDF/XML ,
namespaces, RDF/XML .
3-5 RDF/XML . RDF/XML
description, ,
, about ( about
http://www.example.org/index.html). rdf:Description
3
rdf:about,
URI reference . 4 -
QName exterms:creation-date. URI reference
http://www.example.org/terms/creation-date. -
rdf:Description.
, ,
rdf:about rdf:Description . 5
rdf:Description .
6 rdf:RDF , 2.
-
7/28/2019 Diplomna Rabota IT
25/73
25
3.2. RDFa , HTML -
, .
.
-
, ,
Microsoft Outlook .
. -,
, .
RDFa -,
, RDF
XHTML. RDFa RDF
XHTML ,
-. XHTML , RDFa
XHTML . RDFa XHTML
, RDF ,
RDF/XML XHMTL .
RDF RDFa, o XHTML RDF/XML ,
.
, RDFa XHTML
. ,
.
html xmlns:cal="http://www.w3.org/2002/12/cal/ical#"xmlns:contact="http://www.w3.org/2001/vcard-rdf/3.0#">
...
I'm giving
a talk at the XTech Conference about web widgets,on
May 8th at 10am
-
7/28/2019 Diplomna Rabota IT
26/73
26
.
...
My name is
Jo Smith.I'm a
distinguished web engineerat
Example.org.You can contact me
via email
.
...
, ,
. iCal, URI reference
http://www.w3.org/2002/12/cal/ical#.
RDF vCard, URI reference
http://www.w3.org/2001/vcard-rdf/3.0# . 2 XML
namespaces :
...- , p.
RDF URI reference a about:
...
...everything here pertains to http://example.org/staff/jo...
... , RDF URI reference
.
-
7/28/2019 Diplomna Rabota IT
27/73
27
meta -,
. ,
:
I'm giving a talk at the XTech
Conference about web widgets,
, content:May
8th at 10am
rel URI reference,
, URL href.
contact:email mailto:[email protected].
RDFa
RDF :
_:p0 rdfs:type cal:Vevent;cal:summary "a talk at the XTech Conference about web
widgets"^^XMLLiteral;cal:dtstart "20060508T1000-0500";
contact:fn "Jo Smith"^^XMLLiteral;contact:title "distinguished web engineer"^^XMLLiteral;contact:org ;contact:email .
3.3. OWL3.3.1. OWL
The Web Ontology Language (OWL)
. ,
,
. OWL
-
7/28/2019 Diplomna Rabota IT
28/73
28
, .
OWL ,
.. , ,
.
, OWL
. OWL open world, ..
.
C C1,
.
.
,
, . .
, .
OWL RDF-S
XML, RDF, RDF-S
- .
OWL ,
:
OWL Lite . OWL Lite
, 0 1.
OWL DL (
) (
). OWL DL OWL
(
,
). OWL DL description logics ,
.
-
7/28/2019 Diplomna Rabota IT
29/73
29
OWL Full RDF,
. OWL Full
,
.
, .
:
OWL Lite OWL DL . OWL DL OWL Full . OWL Lite OWL DL
.
OWL DL OWL Full.
, OWL,
- .
RDF OWL DL OWL Lite
RDF ,
OWL DL OWL Lite.
wine.
, .
rdf:RDF , XML namespaces.
-
7/28/2019 Diplomna Rabota IT
30/73
30
xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"xmlns:xsd ="http://www.w3.org/2001/XMLSchema#">
namespaces,
. namespace , .
namespace
vin:. URI
. namespace
food food:. ,
, owl:
namespace http://www.w3.org/2002/07/owl#.
OWL , OWL . OWL
, RDF, RDFS XML Schema
datatypes. rdf: namespace
http://www.w3.org/1999/02/22-rdf-syntax-ns#. namespace
rdfs: RDF Schema xsd: XML Schema datatype.
namespaces owl:Ontology
,
.
An example OWL ontologyWine Ontology...
rdf:about .
, , URI owl:Ontology. URI
, . ,
xml:base, URI ,
URI . owl:imports ,
rdf:resource, ,
-
7/28/2019 Diplomna Rabota IT
31/73
31
. namespace owl:import ,
,
,
. ,
, , .
OWL ,
,
.
owl:sameAs.
,
,
.
3.3.2. OWL OWL ,
, .
- ,
, .
3.3.2.1. OWL owl:Thing.
, , owl:Thing.
owl:Class.
: Winery, Region ConsumableThing.
rdf:ID . ,
Winery #Winery,
rdf:resource=#Winery.
-
7/28/2019 Diplomna Rabota IT
32/73
32
http://www.w3.org/TR/2004/REC-owl-guide-
20040210/wine#Winery.
rdfs:subClassOf
. - - .
.
...
, PortableLiquid ConsumableThing.
: .
.
subClassOf o .
3.3.2.2. .
rdf:type.
Region:
:
.. .
3.3.2.3.
-
7/28/2019 Diplomna Rabota IT
33/73
33
, .
:
, RDF XML Schema ;
, .
, .. ,
. ,
(domain) (range).
owl:DatatypeProperty
owl:ObjectProperty, rdfs:domain
rdfs:range.
madeFromGrape, Wine
WineGrape.
.
.
.
OWL , ,
rdfs:subPropertyOf.
...
-
7/28/2019 Diplomna Rabota IT
34/73
34
...
, WineColor
WineDescriptor. - hasColor ,
() ,
hasWineDescriptor.
owl:minCardinality.
1
,
madeFromGrape.
3.4. JEE 5.0Java Platform, Enterprise Edition (JEE) ,
.
:
Application clients GUI Java, .
-
7/28/2019 Diplomna Rabota IT
35/73
35
Applets GUI Java, . - user interface
HTML.
Servlets, Java Server Pages (JSPs), Java Server Faces(JSFs), filters,web event listeners , web
container HTTP . Servlets, JSP
pages, JSF filters
HTML ,
.
XML ,
. servlet
SOAP/HTTP . Enterprise JavaBeans (EJB) EJB
(container), .
.
SOAP/HTTP .
(services)
, .
4 Java EE
:
-
7/28/2019 Diplomna Rabota IT
36/73
36
4. Java EE 5.0
Java EE 5.0 JEE
. , Java ,
5.0.
JEE deployment descriptors.
JEE
. JNDI lookup
.
JAX-WS ,
JAX-RPC. JAX-WS JAXB ,
Java XML . JAX-WS JAXB Java EE
. JSF Java EE
.
. Java
Persistence API, Java
.
-
7/28/2019 Diplomna Rabota IT
37/73
37
XML
StAX API.
3.4.1. JSFJavaServer Faces(JSF) Java- ,
(UI).
JSF UI ,
http . Java
http ,
Web UI - ,
Desktop UI .
look and feel
UI
.
, UI .
JSF ,
,
Web .
JSF , . UI
, HTML. JSF
Application Programming Interface (API),
, .
,
.
, JSF
, .
. JSF
.
-
7/28/2019 Diplomna Rabota IT
38/73
38
JSF HTML .
renderers UI
. UI
renderers
HTML WML .
3.4.2. Java API for XML Web Services (JAX-WS) 2.0
,
XML. JAX-WS ,
(message-oriented) (RPC-oriented). Java API for
XML-based RPC 1.1 (JAX-RPC), , JAX-WS
Java.
JAX-RPC XML-
SOAP.
( ),
. SOAP (XML
) HTTP.
SOAP , JAX-WS API
.
,
, Java.
, .
.
proxy (
) proxy. JAX-WS
, SOAP . JAX-WS
Java API- SOAP .
-
7/28/2019 Diplomna Rabota IT
39/73
39
JAX-WS,
: Java. JAX-WS
, Java,
. JAX-WS
, W3C: HTTP, SOAP Web Service Description
Language (WSDL). WSDL XML
, endpoints.
JAX-WS JAX-RPC 1.1,
SOAP 1.1, SOAP 1.2, XML,
HTTP. JAX-WS
JAXB 2.0 Java XML .
java , .
3.4.3. Java Persistence APIJava Persistence API Java EE 5.0,
Java
(persistent entities)
. entity persistence ,
EJB2.1.
Java Persistence API :
Entities ( Java, ) Plain Old Java Objects (POJO). EJB 2.1
, container-managed persistence
(CMP), entity
. - -
.
- . EJB 2.1
J2EE
. java XML
-
7/28/2019 Diplomna Rabota IT
40/73
40
-
.
. entities POJO, entity entity -entity
. -entity entity .
entities .
Java Persistence Query Language EJB Query Language. Java Persistence Query Language
.
, , -.
. entity Java ,
. EJB jar, application-client jar, WEB-
INF/lib, WEB-INF/classes utility JAR EAR .
. , ,
,
, .
Detached entities - entity POJO, ,
. Data Transfer
Objects (DTOs), EJB 2.1.
EntityManager API Create,Read, Update, Delete entities.
Service Provider Interface (SPI) Java EE container .
.
-
7/28/2019 Diplomna Rabota IT
41/73
41
4. 4.1.
.
,
.
http://www.schemaweb.info/default.aspx,
.
. :
File -> New, Open, Close, Save. Edit -> Cut, Copy, Paste, Find, Replace. Ontology -> Associate, Delete. Hyperlink -> Insert, Delete. Table -> Insert, Edit, Delete. Format -> Text.
File -> New .
, ,
.
File -> Open ,
, .
File -> Close ,
.
File -> Save .
Edit -> Cut ,
.
Edit -> Copy
,
.
-
7/28/2019 Diplomna Rabota IT
42/73
42
Edit -> Paste ,
File -> Cut File -> Copy, ,
.
Ontology -> Associate
.
,
.
,
. , .
.
Ontology -> Delete , .
Hyperlink -> Insert hyperlink . ,
hyperlink.
Hyperlink -> Delete hyperlink
.
Table -> Insert .
Table -> Edit ,
.
Table -> Delete , .
Format -> Text
.
.
Save, . -
RDF ,
SPARQL
. XHTML 2.0 RDFa
,
- -
-
7/28/2019 Diplomna Rabota IT
43/73
43
,
.
4.2.
, Java EE 5.0
. Model-2 MVC
. MVC (Model-View-
Controller) , HTTP ,
, ..
.
4.2.1. Model-2 MVC Model-2 MVC .
, .
URL,
. URL controller
servlet (Controller/), ,
(Model/) (View/)
. JSP
.
, . 5
Model-2 MVC .
-
7/28/2019 Diplomna Rabota IT
44/73
44
5. Model-2 MVC
Java EE 5.0 JSF
, EJB Java Persistence API .
, .. ,
.
4.2.2.
6:
-
7/28/2019 Diplomna Rabota IT
45/73
45
Browser
Server
Controller
View
Model
FacesServlet
Config
ManagedBeans
Action
Handlers &
Event Listeners
Component
Tree
UI Component
Model
Java
Beans
Delegates
Converters
Validators
Renderers
Resources
Java Beans
Property
Files
XML
Business Objects
Session EJB / Web
service client
Session EJB / Java
Persistence API
RDF Triples Storage
DataBase
Ontology Storage
http://www.schemaweb.info/
default.aspx
Request Response
JDBC SOAP
6.
4.2.2.1. (Controller) (servlet),
FacesServlet JSF ,
-
7/28/2019 Diplomna Rabota IT
46/73
46
, JavaBean ,
managed beans. FacesServlet
, .
managed beans
. ,
, event listener ,
UI
. Managed beans
UI JSF expression language
(EL). UI ,
managed bean, . . managed beans , JSF
, , EJB
.
4.2.2.2. (View) UI
, (, ), .
JSF ,
UI ( ,
..). -, ..
. ,
. view
. UI JavaBean
, .. , ,
- (IDE).
, ,
.
. ,
-
7/28/2019 Diplomna Rabota IT
47/73
47
, UI .
JSF
UI ,
. ,
, . JSF
http
.
, UI
, renderers.
, HTML, WML, SVG ..
( UI ,
) ( http UI
). UI ,
.
UI
(validators). .
JSF UI
.
(converters) UI
. java ,
markup ,
http .
, .
4.2.2.3.
session EJB,
, Java Persistence API Java EE 5.0 ,
.
-
7/28/2019 Diplomna Rabota IT
48/73
48
Session EJBs ,
. EJB
.
,
Java Persistence API, .
session EJBs stateless stateful. Stateless session EJBs
, stateful session
EJBs . Session EBJs
Java Persistence API java ,
.
, , Java Persistence API entities. Java , .. POJOs. Java
Persistence API , -
. Session
EJBs EntityManager Java Persistence API,
, entities .
,
http://www.schemaweb.info/default.aspx,
java proxy wsdl , .
java ,
session EJB java
.
4.3. 7 UML ,
. ,
.
.
-
7/28/2019 Diplomna Rabota IT
49/73
49
7.
-
7/28/2019 Diplomna Rabota IT
50/73
50
4.3.1. JSF UI
javax.faces.webapp.FacesServlet,
,
. FacesServlet
http , 6 :
1. UI .
, ,
, JSF .
2. UI , ,
. .
.
3. . .
.
4. managed beans, UI . .
5. action listeners, HtmlCommandButton.
, .
6. , HTML.
JSP ,
. JSF
, .. JSP JSF taglibs.
-
7/28/2019 Diplomna Rabota IT
51/73
51
JSP , ,
, Welcome.jsp.
.
, FacesServlet
Document.jsp. .
File, Edit, Ontology, Picture, Hyperlink, Table,
, .
File
New Open. FacesServlet File.jsp.
New, File.jsp ,
. Open, File.jsp
, .
, Document.jsp,
.
Edit Cut, Copy, Paste, Find, Replace.
,
Document.jsp. Find Replace Edit.jsp,
. Find
Search ,
. Replace ,
, , .
Find next , Replace
Replace All .
Edit.jsp Close, JSF
Document.jsp.
Ontology Associate
Delete. ,
. Delete,
, . Associate JSF
Ontology.jsp.
-
7/28/2019 Diplomna Rabota IT
52/73
52
.
,
- ,
.
. .
.
.
.
. , .
.
,
.
.
, .
.
. ,
-. Back to editor
. JSF
Document.jsp.
Document.jsp Hyperlink Insert
Delete. Delete -,
. Insert JSF
Hyperlink.jsp.
, , -
. , -.
-. Create
.
-
7/28/2019 Diplomna Rabota IT
53/73
53
Close . JSF
Document.jsp.
Document.jsp Table Insert, Edit,
Delete. Delete ,
. Insert Edit JSF
Table.jsp. Insert
,
. Edit
.
.
. Save Close .
JSF Document.jsp.
Document.jsp Format Text.
. JSF
Format.jsp.
.
,
(regular, bold, italic, bold italic)
. Save
Close .
Document.jsp.
File Save Close. Save
, .
. Close
JSF Welcome.jsp.
-
7/28/2019 Diplomna Rabota IT
54/73
54
4.3.2. JSF Managed Beans JSP managed beans,
JSP. managed beans
. managed beans
API, JSF .
4.3.2.1. DocumentMBDocument.jsp managed bean DocumentMB.
text,
JSF bound value. :
String getText() .
String getSelectedText() .
int getCurrentPosition() .
addText(String text) .
setText(String text) , .
managed bean managed beans,
.
text null. , ,
.. File -> New File -> Open . File -> Close
null.
-
7/28/2019 Diplomna Rabota IT
55/73
55
4.3.2.2. FileMBFileMB managed bean, File.jsp
Document.jsp. , ,
. File.jsp File ->
New File -> Open, Document.jsp File -> Save File -> Close.
documentName,
File.jsp. FileMB :
void newDocument() documentName docs
.
DocumentMB.setText(),
Document.jsp
.
String[] getAvailableDocuments() docs.
void openDocument() documentName.
DocumentMB.setText(String text).
void saveDocument() . OntologyMB.saveDefinitions(),
RDF storage.
RDFa .
DocumentMB.getText() OntologyMB.getDefinitions()
RDFaGenerator.generateDocument(String text,
Hashtable textToTriple), RDFa
FileMB. RDFa
rdfa_docs .
void closeDocument() documentName null.
-
7/28/2019 Diplomna Rabota IT
56/73
56
4.3.2.3. EditMBEditMB managed bean, Document.jsp
Edit.jsp. Document.jsp Edit -> Cut, Edit ->
Copy Edit -> Paste. Edit.jsp EditMB Edit -> Find, Edit ->Replace Edit -> ReplaceAll. managed bean String
buffer. Edit -> Cut Edit ->
Copy. Edit -> Paste null.
void cut() DocumentMB.getSelectedText() , ..
buffer .
DocumentMB.getText()
.
DocumentMB.setText().
void copy() void cut(), , .
void paste() DocumentMB.getCurrentPosition(),
DocumentMB.getText().
, .. buffer
null.
DocumentMB.setText().
int find(String searchForText) - DocumentMB.getText(),
.
int replace(String searchForText, String replaceWithText) DocumentMB.getText(),
.
DocumentMB.setText()
.
void replaceAll(String searchForText, String replaceWithText) int replace(String searchForText,
-
7/28/2019 Diplomna Rabota IT
57/73
57
String replaceWithText),
.
4.3.2.4. OntologyMBOntologyMB managed bean, Ontology.jsp.
, .
,
. session
EJBs Ontology_EJB_WS Ontology_EJB_Persistence,
java . RDFTriple,
, , ,
.
RDFTriple. managed bean String
currentOntology, Hashtable textToTriple, String currentInstanceName, String
currentInstanceValueName, String currentTreeNode, String
currentClassName, String currentPropertyName, String currentValueName.
currentInstanceName
, currentValueName
. CurrentTreeNode
. CurrentClassName
, currentPropertyName
currentValueName .
,
.
RDFTriple. OntologyMB :
void findOntology(String keyword) session beanOntology_EJB_WS, currentOntology.
String[] getAllClasses() Ontology_EJB_WS, , .
-
7/28/2019 Diplomna Rabota IT
58/73
58
String[] getProperties() , currentClassName, Ontology_EJB_WS
.
String[] getValues() , currentClassName currentPropertyName,
Ontology_EJB_WS
.
void createInstance() RDFTriple, RDF .
currentInstanceName,
currentClassName, currentPropertyName, currentValueName,
currentInstanceValueName. ,.. , ,
rdfs:comment.
, RDF.
DocumentMB.getSelectedText()
.
RDFTriple
textToTriple.
void closeOntology() Back toeditor. Ontology_EJB_WS
. OntologyMB
null .
Hashtable getDefinitions() textToTriple. void saveDefinitions() session EJB
Ontology_EJB_Persistence,
.
void deleteAssociation() DocumentMB.getSelectedText() textToTriple.
-
7/28/2019 Diplomna Rabota IT
59/73
-
7/28/2019 Diplomna Rabota IT
60/73
60
.
DocumentMB.setText() .
void delete() - DocumentMB.getText() DocumentMB.getSelectedText(), -
.
DocumentMB.setText() .
4.3.2.7. FormatMBFormatMB managed bean, Format.jsp.
. font, fontStyle
size, Format.jsp.
FormatMB :
void format() - DocumentMB.getText() DocumentMB.getSelectedText()
font, fontStyle size.
DocumentMB.setText()
.
4.3.3. Session EJBs Session EJBs.
: Ontology_EJB_WS
Ontology_EJB_Persistence.
4.3.3.1. Ontology_EJB_WSOntology_EJB_WS ,
.
SchemaWeb. Web service endpoint ,
SchemaWebSoap. namespace. EJB session
bean :
-
7/28/2019 Diplomna Rabota IT
61/73
61
String findOntology(String keyword) namespace .
SchemaWebSoap.getRDFTriples() ,
RDF RDF/XML schema.
,
.
String[] getAllClasses() - .
String[] getAllProperties(String className) .
String[] getAllValues(String className, String propertyName) .
void closeOntology() ontology null.
4.3.3.2. Ontology_EJB_PersistenceOntology_EJB_Persistence Session EJB,
RDF ,
. EntityManager Java Persistence API,
. Entity
RDFTriple . RDF_TRIPLE(SUBJECT,
PROPERTY, VALUE). Ontology_EJB_Persistence
:
void saveDefinitions(Hashtable textToTriple) RDFTriple ,
EntityManager.persist(triple).
4.4.
Sun Java Studio Creator SAP NetWeaver Developer
Studio.
-
7/28/2019 Diplomna Rabota IT
62/73
62
Sun Java Studio Creator
. (Rapid
Application Development - RAD), ..
UI ,
. .
.
,
.
SAP NetWeaver Developer Studio
managed beans, session EJBs,
proxy WSDL , . ,
SAP JEE 5.0 Server
, SAP NetWeaver
Developer Studio.
4.5.
,
.
. JUnit .
, .
, -
.
. .
LoadRunner.
http ,
-
7/28/2019 Diplomna Rabota IT
63/73
63
. ScriptRecorder
LoadRunner, . ,
, , ScriptRecorder
http .
, .
,
.
, ,
.
,
, scalability. . ,
( ),
. LoadRunner
.
,
8 9:
-
7/28/2019 Diplomna Rabota IT
64/73
-
7/28/2019 Diplomna Rabota IT
65/73
65
9. ,
wine.
5.
, ,
.
WWW
WWW.
-
7/28/2019 Diplomna Rabota IT
66/73
66
, ,
, .
,
. ,
RDFa , HTML,
.
,
,
SPARQL , RDF
.
( RDF
), .
,
. ,
, ,
. UI
JSF.
, ,
AJAX
,
.
-
7/28/2019 Diplomna Rabota IT
67/73
67
World Wide Web (WWW) , - -. Internet.
(Semantic Web) WWW, (
).
,
.
World Wide Web Consortium (W3C) WWW.
-,
WWW.
W3C recommendation , W3C.
.
Hypertext Transfer Protocol (HTTP) WWW.
Uniform Resource Identifier (URI) , .
Uniform Resource Locator (URL) URI, ,
WWW.
Extensible Markup Language (XML) markup , W3C, .
, .
XML Namespace W3C, XML ,
, .
-
7/28/2019 Diplomna Rabota IT
68/73
68
Qualified name(Qname) , XML Schema Part2:Datatypes specification, Namespaces in XML,
Namespaces in XML Errata. Qname
Namespace URI, local part prefix.
Unicode , .
- Unicode . Application Programming Interface (API) ,
,
, .
Service Provider Interface (SPI) , .
Resource Description Framework (RDF) W3C, .
RDF - RDF .
,
.
.
Dublin Core , , , , .
Resource Description Framework Schema (RDF-S) ,
. RDF RDF
, RDF .
Web Ontology Language (OWL) . OWL - RDF-S.
SPARQL - RDF .
-
7/28/2019 Diplomna Rabota IT
69/73
69
Extensible HyperText Markup Language (XHTML) markup , HTML, -
.
RDFa XHTML, W3C.
Rule Interchange Format (RIF) , OWL RDF.
Java Platform, Enterprise Edition v. 5(Java EE 5) ( Java 5 )
Java .
,
. JavaServer Pages(JSP), Java Servlet API Java ,
HTML, XML
. JavaEE 5.0 .
JavaServer Faces(JSF) Java- , Java EE .
JavaBean Java, ,
JavaBean .
JSF Managed Bean JavaBean, JSF , JSF.
W3C ,
WWW. API,
.
Simple Object Access Protocol(SOAP) XML- ,
HTTP. SOAP
, ,
- .
-
7/28/2019 Diplomna Rabota IT
70/73
70
Web Services Description Language(WSDL) XML- . 2.0
W3C recommendation.
Java API for XML-based RPC(JAX-RPC) Java API, Java ,
WSDL .
Java API for XML Web Services(JAX-WS) Java API . JAX-RPC Java EE
5.
Java Architecture for XML Binding(JAXB) Java XML, Java
. Java Persistence API Java ,
Java Platform Standard Edition Java Platform Enterprise Edition.
Plain Old Java Object (POJO) , , - , -.
Java , ,
.
Entity POJO , . JavaPersistence API entity
.
Enterprise Java Bean(EJB) , JavaEE
Session EJB EJB , .
Java deployment descriptor, .
,
, XML .
JavaServer Pages Standard Tag Library(JSTL, taglib) Java EE . JSP ,
-
7/28/2019 Diplomna Rabota IT
71/73
71
JSP
XML ,
, .
Model-View-Controller(MVC) , .
,
.
() ()
().
Model-2 MVC MVC , HTTP .
Unified Modeling Language(UML) ,
.
JUnit - Java . LoadRunner performance load
.
Mercury Interactive. 2006
Hewlett-Packard.
Sun Java Studio Creator Java , Sun Microsysems.
SAP NetWeaver Developer Studio Eclipse- SAP , SAP.
Asynchronous JavaScript and XML (AJAX) ,
.
-
7/28/2019 Diplomna Rabota IT
72/73
72
1. Semantic Web: http://www.w3.org/2001/sw/2. RDF Vocabulary Description Language 1.0: RDF Schema:
http://www.w3.org/TR/rdf-schema/
3. RDF Primer: http://www.w3.org/TR/rdf-primer/4. OWL Web Ontology Language Overview: http://www.w3.org/TR/owl-
features/
5. OWL Web Ontology Language Guide: http://www.w3.org/TR/owl-guide/
6. Nigel Shadbolt, Tim Berners-Lee, Wendy Hall, The Semantic WebRevisited: http://www.w3.org/TR/owl-guide/
7. Tim Berners-Lee, James Hendler, Ora Lassila, Scientific American, May2001, The Semantic Web:
http://www.sciam.com/article.cfm?articleID=00048144-10D2-1C70-
84A9809EC588EF21&catID=2
8. Ivan Herman, Introduction to the Semantic Web:http://www.w3.org/2006/Talks/0524-Edinburgh-IH/#(1)
9. Eric Miller, Norwegian Semantic Days 2006, The Semantic Web:Overview:http://www.w3.org/2006/Talks/0426-semweb-em/
10.Tim Berners-Lee, Putting the Web back to Semantic Web:
http://www.w3.org/2005/Talks/1110-iswc-tbl/#(1)
11.Rules Interchange Format Working Group:
http://www.w3.org/2005/rules/wg
12.Semantic Web Best Practices and Deployment Working Group:
http://www.w3.org/2001/sw/BestPractices/
13.Aaron Swartz, The Semantic Web in Breadth:http://logicerror.com/semanticWeb-long
14.Java Platform Enterprise Edition (Java EE) Specification, v5:
http://java.sun.com/javaee/technologies/javaee5.jsp
15.Rima Patel Sriganesh, Gerald Brose, Micah Silverman, Mastering
Enterprise Java Beans 3.0
-
7/28/2019 Diplomna Rabota IT
73/73
16.Kito D. Mann, JavaServer Faces in Action
17.Bill Dudney, Jonathan Lehr, Bill Willis, LeRoy Mattingly, Mastering
JavaServer Faces
18.Enterprise Java Technologies Tech Tips:
http://java.sun.com/developer/EJTechTips/
19.Getting Started with Protg OWL:
http://protege.stanford.edu/doc/owl/getting-started.html
20.Wikipedia: http://www.wikipedia.org/