23 | * Potential uses: 24 | *
31 | * {
32 | * <object_id>: [<event_type>, ...],
33 | * ...
34 | * }
35 | *
36 | */
37 | public static final String SUBSCRIPTION_TABLE = "Subscription Table";
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/org/o3project/odenos/remoteobject/manager/ComponentTypesHash.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 NEC Corporation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.o3project.odenos.remoteobject.manager;
18 |
19 | import org.o3project.odenos.remoteobject.manager.component.ComponentType;
20 | import org.o3project.odenos.remoteobject.message.MessageBodyUnpacker.TemplateHashMap;
21 |
22 | /**
23 | * HashMap for type of component.
24 | *
25 | */
26 | @SuppressWarnings("serial")
27 | public class ComponentTypesHash extends TemplateHashMap
7 |
8 | # Architecture
9 |
10 |
11 |
12 | #Usage
13 | ```
14 | To reflect the component configuration of odenos to neo4j.
15 | > PYTHONPATH=../../lib/python/ ./neo4jsync.py
16 |
17 | To reflect the component configuration and topology of odenos to neo4j.
18 | > PYTHONPATH=../../lib/python/ ./neo4jsync.py topology
19 | ```
20 | #Setup Neo4j
21 |
22 | 1. Get&Install Neo4j-server http://neo4j.com/download/
23 |
24 |
25 |
26 | 2. Edit the following parameters in *./conf/neo4j-server.properties*
27 | * dbms.security.auth_enabled=false
28 | * org.neo4j.server.webserver.address=0.0.0.0
29 |
30 |
31 |
32 | 3. Start Neo4j-server
33 |
34 | ```
35 | $ ./bin/neo4j start
36 | ```
37 | 4. In a browser, open http://localhost:7474/
38 |
39 |
40 |
41 | 5. configure Graph Style Sheet
42 |
43 | drop file "./apps/neo4j/graphstyle.grass"
44 |
45 |
46 |
47 | # View Graph
48 |
49 |
50 | 1. Run ODENOS & example
51 |
52 | ```
53 | $ cd (ODENOS_HOME)
54 | $ ./odenos start
55 | $ ./apps/rest_sample/rest_sample.sh
56 | $ PYTHONPATH=./lib/python/ ./apps/neo4j/neo4jsync.py
57 | ```
58 |
59 | 2. In a browser, open http://localhost:7474/
60 |
61 | * Click on the star mark
62 | * General -> Get some data
63 | * Click on the play mark
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/src/main/java/org/o3project/odenos/remoteobject/manager/component/event/ComponentChanged.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 NEC Corporation.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.o3project.odenos.remoteobject.manager.component.event;
18 |
19 | import org.o3project.odenos.remoteobject.ObjectProperty;
20 | import org.o3project.odenos.remoteobject.event.BaseObjectChanged;
21 |
22 | /**
23 | * The event to notify of change in the Component.
24 | *
25 | */
26 | public class ComponentChanged extends BaseObjectChanged