Showing posts with label CS548. Show all posts
Showing posts with label CS548. Show all posts

Monday, April 22, 2013

Petrit Net

http://www.informatik.uni-hamburg.de/TGI/PetriNets/introductions/aalst/

http://www.informatik.uni-hamburg.de/TGI/PetriNets/

A Petri net (also known as a place/transition net or P/T net) is one of several mathematical modeling languages for the description of distributed systems. A Petri net is a directed bipartite graph, in which the nodes represent transitions (i.e. events that may occur, signified by bars) and places (i.e. conditions, signified by circles). The directed arcs describe which places are pre- and/or postconditions for which transitions (signified by arrows) occurs. Some sources[1] state that Petri nets were invented in August 1939 by Carl Adam Petri — at the age of 13 — for the purpose of describing chemical processes.

weight of arcs

Monday, April 15, 2013

Business_Process_Modeling_BPMN

Resource Description Framework (RDF)

N3(N-triple)Validator

N3 EXAMPLES

A Java Program that can read write N3

reference 

TERMS:

OWL: Web Ontology Languages 


RDF: RESOURCE DESCRIPTION FRAMEWORK 

example of RDF:


The fundamental concepts of RDF are: 
– resources
– properties
– statements 

Tutorial to RDF
http://www.rdfabout.com/quickintro.xpd
Tutorial to N3
http://www.w3.org/2000/10/swap/Primer
http://eulersharp.sourceforge.net/2004/02swap/RDFEngine/inferencing.htm
http://infomesh.net/2002/notation3/


Graphical Representations


http://www.infowebml.ws/rdf-owl/graphical-representations.htm#member

N3 Example:
 RDF triples

A student record in a database has the following fields: 
- name 
- major 
- student identity number 
- GPA 
- Advisor 

Model this database using RDF triples, by defining the classes and properties. Use the N3 notation. Give the triples for one example student record. 


:student rdf:type rdfs:Class.    //rdf:type  //student是 Class
:name rdf:type rdf:Property.  //name 是 Property
:major rdf:type rdf:Property.
:sin rdf:type rdf:Property.
:gpa rdf:type rdf:Property.
:advisor rdf:type rdf:Property.


:name rdfs:domain :student.  //Property - name 属于 student (Class student 拥有Property - name)
:major rdfs:domain :student.
:sin rdfs:domain :student.
:gap rdfs:domain :student.
:advisor rdfs:domain rdf:student.

student1 rdf:type :student.     //student1 是 student (instance)
student1 :name "Joe Smith".
student1 :major "Computer Science".
student1 :sin 12345678.
student1 :gpa 3.5.
student1 :advisor faculty17.


The property which tells you what type something is is rdf:type which can be abbreviated to N3 to just a. So we can define a class of person
:Person a rdfs:Class.



Define the following using OWL statements: 
1. A student has exactly one advisor. 
2. A student is uniquely identified by their SIN. 
3. Define the set of honor students as the set of all students whose GPA is 4.0. This is a very strong notion of honor student, but it greatly simplifies the question for you.


1. :advisor rdf:type owl:functionalProperty.
2. :sin rdf:type owl:inverseFunctionalProperty.
3. :honorStudent owl:equivalentClass
      [ a owl:Restriction ;
owl:onProperty :gpa ;
owl:hasValue .40 ]

rdf:domain v.s. rdf:range
There is an example here: http://www.w3.org/2000/10/swap/Primer


The property which tells you what type something is is rdf:type which can be abbreviated to N3 to just a. So we can define a class of person
:Person a rdfs:Class.
In the same document, we could introduce an actual person
:Pat a :Person.
Classes just tell you about the thing which is in them. An object can be in many classes. There doesn't have to be any hierarchical relationship -- think of Person, AnimateObject, Animal, TallPerson, Friend, and so on. If there is a relationship between two classes you can state it - check out the properties (of classes) in the RDF Schema and OWL vocabularies.
:Woman a rdfs:Class; rdfs:subClassOf :Person .
A property is something which is used to declare a relationship between two things.
:sister a rdf:Property.
Sometimes when a relationship exists between two things, you immediately know something about them, which you can express as a class. When the subject of any property must be in a class, that class is a domain of the property. When the object must be in a class, that class is called the range of a property. A property can have many domains and ranges, but typically one specifies one.
:sister rdfs:domain :Person; 
        rdfs:range :Woman.
Note the class identifiers start with capitals and properties with lower case letters. This is not a rule, but it is a good convention to stick to. Note also that because the domain of rdfs:range and rdfs:domain themselves is rdf:Property, it follows that :sister is a rdf:Property without it being stated explicitly.

rdfs:domain vs rdfs:range
Example 
"When the subject of any property must be in a class, that class is a domain of the property. When the object must be in a class, that class is called the range of a property."
http://workingontologist.org/Examples/Chapter3/shakespeare.n3
a Person linvedIn a Place

bio:livedIn
      a       owl:ObjectProperty ;
      rdfs:domain lit:Person ;//subject
      rdfs:label "lived in"^^xsd:string ;
      rdfs:range lit:Place . //object



Wednesday, March 20, 2013

How SOAP message looks like


getPatientByDbId Method invocation



Method parameter(s)

TypeValue
long2

Method returned

edu.stevens.cs548.clinic.service.dto.patient.PatientDto : "edu.stevens.cs548.clinic.service.dto.patient.PatientDto@79a7c927"

SOAP Request


<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Header/>
    <S:Body>
        <ns3:getPatientByDbId xmlns:ns2="http://cs548.stevens.edu/clinic/service/dto/patient" xmlns:ns3="http://cs548.stevens.edu/clinic/service/web/soap/patient" xmlns:ns4="http://cs548.stevens.edu/clinic/service/dto/treatment">
            <arg0>2</arg0>
        </ns3:getPatientByDbId>
    </S:Body>
</S:Envelope>

SOAP Response


<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <ns2:getPatientByDbIdResponse xmlns:ns2="http://cs548.stevens.edu/clinic/service/web/soap/patient" xmlns:ns3="http://cs548.stevens.edu/clinic/service/dto/patient" xmlns:ns4="http://cs548.stevens.edu/clinic/service/dto/treatment">
            <ns3:PatientDto>
                <id>2</id>
                <patient-id>10001</patient-id>
                <name>Sam</name>
                <dob>1988-03-20Z</dob>
            </ns3:PatientDto>
        </ns2:getPatientByDbIdResponse>
    </S:Body>
</S:Envelope>

Sunday, March 17, 2013

Message-driven bean





@MessageDriven(mappedName = "jms/alert",
  activationConfig = {
    @ActivationConfigProperty(
       propertyName = "messageSelector",
       propertyValue = "altertType='Containment' AND priority < 5")
) 

Enterprise Bean / Message Driven Bean


JAVAEE 6 Tutorial 


Part IV
Enterprise Beans

Part IV explores Enterprise JavaBeans components. This part contains the following chapters:

Chapter 22
Enterprise Beans

Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the GlassFish Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services, such as transactions and security, to its enterprise beans. These services enable you to quickly build and deploy enterprise beans, which form the core of transactional Java EE applications.
Java EE Server and Containers
Diagram of client-server communication showing servlets and web pages in the web tier and enterprise beans in the business tier.


What Is an Enterprise Bean?

Written in the Java programming language, an enterprise bean is a server-side component that encapsulates the business logic of an application. 


Benefits of Enterprise Beans

For several reasons, enterprise beans simplify the development of large, distributed applications. First, because the EJB container provides system-level services to enterprise beans, the bean developer can concentrate on solving business problems. The EJB container, rather than the bean developer, is responsible for system-level services, such as transaction management and security authorization.


Types of Enterprise Beans

Table 22-1 summarizes the two types of enterprise beans. The following sections discuss each type in more detail.

Table 22-1 Enterprise Bean Types
Enterprise Bean Type
Purpose
Session
Performs a task for a client; optionally, may implement a web service
Message-driven
Acts as a listener for a particular messaging type, such as the Java Message Service API




Message Driven Bean
http://docs.oracle.com/javaee/6/api/javax/ejb/MessageDriven.html




CS548 Content

January 14 - January 20

Introduction: Middleware
Show only week 1
 

January 21 - January 27

Data Modeling
Show only week 2
 

January 28 - February 3

Data Processing
Show only week 3
 

February 4 - February 10

Domain-Driven Design
Show only week 4
 

February 11 - February 17

Service-Oriented Architecture I
Show only week 5
 

February 18 - February 24

Service-Oriented Architecture II
Show only week 6
 

February 25 - March 3

Resource-Oriented Architecture
Show only week 7
 

March 4 - March 10

Message-Oriented Architecture
Show only week 8
 This week

March 11 - March 17

Event-Driven Architecture
Show only week 9
 

April 1 - April 7

NoSQL Data Modeling